package com.ruoyi.task.service.impl;

import com.ruoyi.task.domain.TaskConfig;
import com.ruoyi.task.service.ITaskTypeService;
import lombok.Data;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Map;

@Service
@Data
public class TaskTypeDealService {
    private TaskConfig taskConfig;

    @Resource
    private Map<String, ITaskTypeService> iTaskTypeServiceMap;

    public void dealTaskTypeService(String taskTypeCode){
        ITaskTypeService iTaskTypeService = iTaskTypeServiceMap.get(taskTypeCode);
        iTaskTypeService.deal(taskConfig);
    }
}
